home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / doc.lha / doc.doc / features.doc < prev    next >
Text File  |  1992-09-25  |  7KB  |  583 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              Automatic Generation
  9.                             of Efficient Compilers
  10.  
  11.  
  12. using a complete tool box containing:
  13.  
  14.    Rex      scanner generator
  15.  
  16.    Lalr     LALR(1) parser generator
  17.  
  18.    Ell      LL(1) parser generator
  19.  
  20.    Ast      generator for abstract syntax trees
  21.  
  22.    Ag       attribute evaluator generator (OAG)
  23.  
  24.    Estra    transformation of attributed syntax trees
  25.  
  26.    Beg      back end generator
  27.  
  28.    Reuse    library of reusable modules
  29.  
  30.  
  31. advantages:
  32. - specification replaces implementation
  33. - tools reduce construction effort
  34. - consistency checks avoid errors
  35. - program generation increases reliability
  36. - efficiency comparable to hand-written implementations
  37.  
  38. common properties:
  39. - implementation languages are Modula-2 or C
  40. - target languages are Modula-2 or C
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                              Compiler Generation
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.                                      Rex
  136.  
  137.                              a scanner generator
  138.  
  139.  
  140. - specifications are based on regular expressions
  141.  
  142. - actions are composed of target language statements
  143.  
  144. - right context is handled by an additional regular expression
  145.  
  146. - left context is handled by start states
  147.  
  148. - conflicts are resolved in favour of longest match and first rule given
  149.  
  150. - provides line and column of every token
  151.  
  152. - can normalize tokens to lower or upper case letters
  153.  
  154. - knows predefined rules to skip white space
  155.  
  156. - can handle include files
  157.  
  158. - generates table-driven scanners
  159.  
  160. - generates efficient scanners
  161.  
  162. - generates scanners in Modula-2 or C
  163.  
  164. - scanners process up to 180,000 lines/minute (on MC 68020)
  165.  
  166. - scanners are 4 times faster than those of LEX
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                                      Lalr
  201.  
  202.                               a parser generator
  203.  
  204.  
  205. - processes LALR(1) grammars
  206.  
  207. - actions are composed of target language statements
  208.  
  209. - allows to evaluate an S-Attribution during parsing
  210.  
  211. - reports grammar conflicts by easy to understand derivation trees
  212.  
  213. - resolves grammar conflicts with precedence and associativity
  214.  
  215. - generates automatic error reporting, recovery, and repair
  216.  
  217. - generates table-driven parsers
  218.  
  219. - generates efficient parsers
  220.  
  221. - generates parsers in Modula-2 or C
  222.  
  223. - parsers process up to 35,000 tokens/sec. or 580,000 lines/min. (on MC 68020)
  224.  
  225. - parsers are 3 times faster than those of YACC
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                      Ell
  266.  
  267.                               a parser generator
  268.  
  269.  
  270. - processes LL(1) grammars in extended BNF
  271.  
  272. - actions are composed of target language statements
  273.  
  274. - allows to evaluate an L-Attribution during parsing
  275.  
  276. - generates automatic error reporting, recovery, and repair
  277.  
  278. - generates recursive descent parsers
  279.  
  280. - generates efficient parsers
  281.  
  282. - generates parsers in Modula-2 or C
  283.  
  284. - parsers process up to 55,000 tokens/sec. or 900,000 lines/min. (on MC 68020)
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.                                      Ast
  331.  
  332.                     a generator for abstract syntax trees
  333.  
  334.  
  335. - generates abstract data types (program modules) to handle trees
  336.  
  337. - the trees may be attributed
  338.  
  339. - besides trees graphs are handled as well
  340.  
  341. - nodes may be associated with arbitrary many attributes of arbitrary type
  342.  
  343. - specifications are based on extended context-free grammars
  344.  
  345. - common notation for concrete and abstract syntax
  346.  
  347. - as well as for attributed trees and graphs
  348.  
  349. - an extension mechanism provides single inheritance
  350.  
  351. - trees are stored as linked records
  352.  
  353. - generates efficient program modules
  354.  
  355. - generates modules in Modula-2 or C
  356.  
  357. - provides many tree operations (procedures):
  358.  
  359. - node constructors combine aggregate notation and storage management
  360.  
  361. - ascii graph reader and writer
  362.  
  363. - binary graph reader and writer
  364.  
  365. - reversal of lists
  366.  
  367. - top down and bottom up traversal
  368.  
  369. - interactive graph browser
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.                                       Ag
  396.  
  397.                        an attribute evaluator generator
  398.  
  399.  
  400. - processes ordered attribute grammars (OAGs)
  401.  
  402. - processes higher order attribute grammars (HAGs)
  403.  
  404. - operates on abstract syntax
  405.  
  406. - is based on tree modules generated by Ast
  407.  
  408. - the tree structure is fully known
  409.  
  410. - terminals and nonterminals may have arbitrary many attributes
  411.  
  412. - attributes can have any target language type
  413.  
  414. - allows tree-valued attributes
  415.  
  416. - differentiates input and output attributes
  417.  
  418. - allows attributes local to rules
  419.  
  420. - allows to eliminate chain rules
  421.  
  422. - offers an extension mechanism (single inheritance)
  423.  
  424. - attributes are denoted by unique selector names
  425.  
  426.    instead of nonterminal names with subscripts
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                       Ag
  461.  
  462.                  an attribute evaluator generator (continued)
  463.  
  464.  
  465. - attribute computations are expressed in the target language
  466.  
  467. - attribute computations are written in a functional style
  468.  
  469. - attribute computations can call external functions
  470.  
  471. - non-functional statements and side-effects are possible
  472.  
  473. - allows to write compact, modular, and readable specifications
  474.  
  475. - AGs can consist of several modules
  476.  
  477. - the context-free grammar is specified only once
  478.  
  479. - checks an AG for completeness of the attribute computations
  480.  
  481. - checks for unused attributes
  482.  
  483. - checks an AG for the classes SNC, DNC, OAG, LAG, and SAG
  484.  
  485. - the evaluators are directly coded using recursive procedures
  486.  
  487. - generates efficient evaluators
  488.  
  489. - generates evaluators in Modula-2 (or C)
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                     Estra
  526.  
  527.           a generator for transformations of attributed syntax trees
  528.  
  529.  
  530. - is based on tree modules generated by Ast
  531.  
  532. - specifications are rule based
  533.  
  534. - a rule consists of a pattern and an action
  535.  
  536. - actions are composed of target language statements
  537.  
  538. - patterns describe tree fragments
  539.  
  540. - several transformations can be specified
  541.  
  542. - subtrees can be transformed in any order
  543.  
  544. - subtrees can be transformed several times
  545.  
  546. - subtrees can be transformed by several transformations
  547.  
  548. - inherited and synthesized attributes can be evaluated
  549.  
  550. - ambiguities are resolved using costs
  551.  
  552. - application of rules can be restricted by conditions
  553.  
  554. - pattern-matching by directly coded dynamic programming algorithm
  555.  
  556. - or by table-driven tree pattern-matcher
  557.  
  558. - generates efficient transformation modules
  559.  
  560. - generates transformation modules in Modula-2
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.